import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    name:"Main",
    component:()=>import("../views/Main.vue"),
    children:[
      {
        path:"home",
        alias:"",
        name:"Home",
        component:()=>import("../views/Home.vue")
      },
      {
        path:"category",
        name:"Category",
        component:()=>import("../views/Category.vue")
      },
      {
        path:"living",
        name:"Living",
        component:()=>import("../views/Living.vue")
      },
      {
        path:"shopping",
        name:"Shopping",
        component:()=>import("../views/Shopping.vue")
      },
      {
        path:"my",
        name:"My",
        component:()=>import("../views/My.vue")
      },
    ]
  },
  {
    path:"/details/:itemID",
    name:"Details",
    component:()=>import("../views/Details.vue")
  },
  {
    path:"/signIn",
    name:"SignIn",
    component:()=>import("../views/SignIn.vue")
  },
  {
    path:"/shoppingson",
    name:"Shoppingson",
    component:()=>import("../views/Shoppingson.vue")
  },
  //待付款
  {
    path:"/tobepaid",
    name:"ToBePaid",
    component:()=>import("../views/ToBePaid.vue")
  },
  // 退换货
  {
    path:"/returnand",
    name:"ReturnAnd",
    component:()=>import("../views/ReturnAnd.vue")
  },
  // 搜索
  {
    path:"/shousuo",
    name:"ShouSuo",
    component:()=>import("../views/ShouSuo.vue")
  },
  // 收藏
  {
    path:"/collection",
    name:"Collection",
    component:()=>import("../views/Collection.vue")
  },
  // 优惠卷
  {
    path:"/coupon",
    name:"Coupon",
    component:()=>import("../views/Coupon.vue")
  },
  // 收货地址
  {
    path:"/shiptoaddress",
    name:"ShipToAddress",
    component:()=>import("../views/ShipToAddress.vue")
  },
  // 创建地址
  {
    path:"/appshiptoand",
    name:"AppShipToAnd",
    component:()=>import("../views/AppShipToAnd.vue")
  },
 
  // 确任订单
  {
    path:"/dingdan",
    name:"Dingdan",
    component:()=>import("../views/Dingdan.vue")
  },
  // 结算页面
  {
    path:"/jiesuan",
    name:"JieSuan",
    component:()=>import("../views/JieSuan.vue")
  },
  // 设置页面
  {
    path:"/shezhi",
    name:"Shezhi",
    component:()=>import("../views/Shezhi.vue")
  },
 
]

const router = new VueRouter({
  routes
})

export default router
